#include<stdio.h>
#include<stdlib.h>
typedef struct
{
   char name[21];
   char id[21];
   int score[5];
   int total;
   double average;
} student;

int main()
{
    int n;
    scanf("%d",&n);
    getchar();
    
    student b[101];
    for(int i=0;i<n;i++)
    {
        
        b[i].total=0;
        b[i].average=0.0;//初始化部分
    }
   

    
    
    for(int i=0;i<n;i++)
    {
     gets(b[i].name);
     gets(b[i].id);
     for(int j=0;j<5;j++)
     {
        scanf("%d",&(b[i].score[j]));
        b[i].total+=b[i].score[j];
     }//输入部分
     b[i].average=b[i].total*1.000/5;
     getchar();
    }
    
    
    for(int i=0;i<n;i++)
    {
     printf("Name:%s\n",b[i].name);
     printf("ID:%s\n",b[i].id);
     printf("Score:%d %d %d %d %d\n",b[i].score[0],b[i].score[1],b[i].score[2],b[i].score[3],b[i].score[4]);
     printf("average:%.2lf total:%d\n",b[i].average,b[i].total);
     printf("\n");
     //输出部分
    }
    return 0;
    


}